package com.yxw.springmvc.userBehavior.validator;

import com.yxw.springmvc.userBehavior.enums.UserStatEnum;
import com.yxw.springmvc.userBehavior.model.User;
import com.yxw.springmvc.userBehavior.util.CollectionUtils;

/**
 * 用户信息校验类
 * Author: yangxianwang
 * Date:   2016/9/23
 * Time:   8:53
 */
public class UserValidatorService {
    public boolean checkUserIsValid(User user){
        if(CollectionUtils.isEmpty(user)){
            return false;
        }
        if(UserStatEnum.USER_INVALID.getCode().equals(user.getStat())){
            return false;
        }
        return true;
    }
}
